<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            /* 给父级添加flex属性 */
            display: flex;
            width: 800px;
            height: 300px;
            background-color: greenyellow;
            /* 默认的主轴是 x 轴 行 row（默认从左到右）则 y 轴为侧轴   */
            /* 我们的元素是跟着主轴来排列的 */
            /* flex-direction: row; */
            /* 简单了解； 翻转 左边变右边，且123变321 */
            /* flex-direction: row-reverse; */
            /* 主轴设为 y 轴 则x轴成为侧轴   colum（从上到下） */
            flex-direction: column;
            /* flex-direction: column-reverse; */
        }
        
        div span {
            width: 150px;
            height: 100px;
            background-color: red;
        }
    </style>

</head>

<body>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
    </div>
</body>

</html>